package com.ldp.designpatterns.study.state.impl;

import com.ldp.designpatterns.study.state.service.ElevatorState;

/**
 * @ClassName OpenState TODO 第2步:实现开门类
 * @Description TODO 当一个对象的行为在不同状态下发生改变，并且对象需要根据其状态执行不同的操作时，就可以考虑使用状态模式。
 * @Author lindipei
 * @Date 2023/10/18 16:27
 */
public class OpenState implements ElevatorState {
    @Override
    public void openDoors() {
        System.out.println("Doors are already open.");
    }

    @Override
    public void closeDoors() {
        System.out.println("Closing doors.");
    }
    @Override
    public void move() {
        System.out.println("Cannot move while doors are open.");
    }

    @Override
    public void stop() {
        System.out.println("Stopping while doors are open.");
    }
}
